<div class="awards form">
<?php echo $this->Form->create('Award');?>
    <fieldset>
        <legend>
            <?php __('Request Award'); ?>
        </legend>
    <?php
        echo $this->Form->input('member_id', array('type' => 'hidden'));
        echo $this->Html->div('input date required');
        echo $this->Form->label('date', 'During which month did the activity that this award is for occur?');
        echo $this->Form->hidden('date.day', array('value' => '01'));
        echo $this->Form->month('date', date('m'), array('empty' => false));
        echo '-';
        echo $this->Form->year('date', '1995', date('Y'), date('Y'), array('empty' => false));
        echo '</div>';
        echo $this->Form->input('category_id', array('label' => 'In which category does this award belong?'));
        echo $this->Form->input('member_location_id', array('type' => 'hidden'));
        echo $this->Form->input('location_id', array('type' => 'hidden'));
        echo $this->Form->input('location_performed_id', array('label' => 'In which location did the activity that this award is for take place?'));
        $this->Js->get('#AwardLocationPerformedId');
        $this->Js->event('change', '
            if ($(this).val() != $("#AwardLocationId").val()) {
                $("#AwardRecommendedAtUrlDiv").removeClass("hidden");
            } else {
                $("#AwardRecommendedAtUrlDiv").addClass("hidden");
            }
        ');
        echo $this->Form->input('recommended_at_url', array(
        	'label' => 'What is the URL of the report that contains the recommendation for this award?',
        	'size' => 55,
        	'div' => array(
        		'class' => 'input text required' . ($this->data['Award']['location_id'] == $this->data['Award']['location_performed_id'] ? ' hidden' : ''),
        		'id' => 'AwardRecommendedAtUrlDiv'
        	)
        ));
        echo $this->Form->input('activity_description', array('label' => 'What is the activity that this award is for?', 'div' => 'input text required', 'size' => 55));
        echo $this->Form->input('notes', array('label' => 'What notes do you wish to put for this award?', 'rows' => 4, 'cols' => 70));
        echo $this->Form->input('status', array('type' => 'hidden'));
    ?>
    </fieldset>
    <?php echo $this->Js->submit(__('Submit', true), array(
        'div' => 'submit inline-block',
        'update' => '#content',
        'buffer' => false,
        'before' =>
    		$this->Js->get('#busy-indicator')->effect('fadeIn', array('buffer' => false)) .
    		$this->Js->get('#message-block')->effect('fadeOut', array('buffer' => false, 'speed' => 'fast')),
        'complete' => $this->Js->get('#busy-indicator')->effect('fadeOut', array('buffer' => false))
    ));?>
    <?php if (!empty($message)) { ?>
    <div id="message-block" class="message inline-block"><?php echo $message; ?></div>
    <?php } ?>
</div>
<div class="actions">
    <h3><?php __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('List Awards', true), array('action' => 'index'));?></li>
    </ul>
</div>
<?php echo $this->Js->writeBuffer(); ?>